package com.genia.toolbox.uml_generator.model.impl;

import com.genia.toolbox.uml_generator.model.AbstractClassModel;
import com.genia.toolbox.uml_generator.model.AssociationCardinality;
import com.genia.toolbox.uml_generator.model.AssociationType;
import com.genia.toolbox.uml_generator.model.AttributeModel;

/**
 * this class represents one end of an association.
 */
public class AssociationEnd
    extends AbstractObjectImpl
{
  /**
   * the type of the elements of this end of the association.
   */
  private AbstractClassModel type = null;

  /**
   * the cardinality of this end of the association.
   */
  private AssociationCardinality cardinality;

  /**
   * the qualifier of this end of the association.
   */
  private AttributeModel qualifier = null;

  /**
   * the type of the association.
   */
  private AssociationType associationType = AssociationType.AGGREGAT;

  /**
   * is this end navigable.
   */
  private boolean navigable;



  /**
   * getter for the type property.
   * 
   * @return the type
   */
  public AbstractClassModel getType()
  {
    return type;
  }



  /**
   * setter for the type property.
   * 
   * @param type
   *          the type to set
   */
  public void setType(AbstractClassModel type)
  {
    this.type = type;
  }



  /**
   * getter for the cardinality property.
   * 
   * @return the cardinality
   */
  public AssociationCardinality getCardinality()
  {
    return cardinality;
  }



  /**
   * setter for the cardinality property.
   * 
   * @param cardinality
   *          the cardinality to set
   */
  public void setCardinality(AssociationCardinality cardinality)
  {
    this.cardinality = cardinality;
  }



  /**
   * getter for the qualifier property.
   * 
   * @return the qualifier
   */
  public AttributeModel getQualifier()
  {
    return qualifier;
  }



  /**
   * setter for the qualifier property.
   * 
   * @param qualifier
   *          the qualifier to set
   */
  public void setQualifier(AttributeModel qualifier)
  {
    this.qualifier = qualifier;
  }



  /**
   * getter for the associationType property.
   * 
   * @return the associationType
   */
  public AssociationType getAssociationType()
  {
    return associationType;
  }



  /**
   * setter for the associationType property.
   * 
   * @param associationType
   *          the associationType to set
   */
  public void setAssociationType(AssociationType associationType)
  {
    this.associationType = associationType;
  }



  /**
   * getter for the navigable property.
   * 
   * @return the navigable
   */
  public boolean isNavigable()
  {
    return navigable;
  }



  /**
   * setter for the navigable property.
   * 
   * @param navigable
   *          the navigable to set
   */
  public void setNavigable(boolean navigable)
  {
    this.navigable = navigable;
  };

}